package com.example.g5project.repository.repo;

import com.example.g5project.entity.relation.ConsultantMessages;
import com.example.g5project.repository.dao.ConsultantMessageDao;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Hu Zirui
 * @version 1.0.0
 * @ClassName AdministratorRepo.java
 * @Description TODO
 * @createTime 2022年03月23日 14:26:00
 */
@Component
@Transactional
public class ConsultMessageRepo extends Repo<ConsultantMessages, Integer> {
    private final ConsultantMessageDao consultantMessagesDao;

    protected ConsultMessageRepo(JpaRepository<ConsultantMessages, Integer> dao, ConsultantMessageDao consultantMessagesDao) {
        super(dao);
        this.consultantMessagesDao = consultantMessagesDao;
    }

    public void addConsultMessageAll(ConsultantMessages consultantMessages) {
        save(consultantMessages);
    }
}
